var app =new Vue({
	el:"#container",
	data: {
		listhui:[],
		ww : ""
		
	},
	mounted() {
		this.selecthui();
	},
	methods:{
		selecthui(userName){
			let data= new URLSearchParams;
			data.append("pageNum",1),
			data.append("pageSize",10),
			data.append("userName",userName);
			axios({
				method : "post",
				url : "laifang/selectvisitor",
				data : data
			}).then(response=>{
				this.listhui=response.data.data
				console.log(this.listhui);
			})
		},
		chaxun(){
			this.selecthui(app.ww)
		},
		pizun(a){
			let data= new URLSearchParams;
			data.append("id",a),
			data.append("status",2);
			axios({
				method : "post",
				url : "laifang/tyrys",
				data : data
			}).then(response=>{
				alert("已批准")
				this.selecthui();
			})
		},
		upizun(a){
			let data= new URLSearchParams;
			data.append("id",a),
			data.append("status",5);
			axios({
				method : "post",
				url : "laifang/tyrys",
				data : data
			}).then(response=>{
				alert("不批准")
				this.selecthui();
			})
		}
	}
})